<?php
/**
 * $Id: basic.php 3 2010-04-05 10:01:57Z webbochsant $
 *  @package	Joomla
 *  @author Daniel Eliasson
* 	@copyright	Copyright (C) 2010 Stilero. All rights reserved.
* 	@license	GNU/GPL, see LICENSE.php
* 	Joomla! is free software. This version may have been modified pursuant
* 	to the GNU General Public License, and as distributed it includes or
* 	is derivative of works licensed under the GNU General Public License or
* 	other free or open source software licenses.
*/

// no direct access
defined('_JEXEC') or die('Restricted access'); 

global $mosConfig_absolute_path;
// Load the virtuemart main parse code
if( file_exists(dirname(__FILE__).'/../../../components/com_virtuemart/virtuemart_parser.php' )) {
	require_once( dirname(__FILE__).'/../../../components/com_virtuemart/virtuemart_parser.php' );
} else {
	require_once( dirname(__FILE__).'/../../components/com_virtuemart/virtuemart_parser.php' );
}
 
require_once( CLASSPATH . 'ps_product.php');
$ps_product = new ps_product; 

$show_price = $params->get( 'show_price', 1 ); //Display price? 
$show_addtocart = $params->get( 'show_addtocart', 1 ); //Display Add-to-cart button? 

?>
<?php 
//Load css to Joomla
$document =& JFactory::getDocument();
$cssurl="modules/mod_virtuemart_featureprod_xhtml/css/vm_featureprod_basic.css";
$document->addStyleSheet($cssurl, "text/css", "screen");
?>

<div class="feature_products">
		<?php $i=1 ?>
		<?php foreach ($list as $item){?>
			<?php if($i==1){ ?>
			<div class="product_row">
			<?php } ?>
				<div class="product item<?php print $i; ?>">
				<?php $ps_product->show_snapshot($item->product_sku, $show_price, $show_addtocart);?>
				</div>
			<?php if($i++==$params->get(products_per_row)){?>
			</div><?php $i=1; ?>
			<?php } ?>
		<?php } ?>
		<?php if($i!=1){ ?>
		</div><?php }?>
		<div id="featureprod_footer">	
			<?php if($params->get(producer_link)){ ?>
			<div class="producer"><a href="http://www.stilero.com" title="<?php print JText::_('VIRTUEEXT');?>" target="_blank"><?php print JText::_('VIRTUEEXT');?></a></div>
			<?php } ?>
		</div>
	</div>

